{include file='index/_header.html'}

<div class="top-header" style="background-image: url(__STATIC__/themes/__THEME__/img/banner.jpg)">
    <div class="container">
        <h2 class="top-title">{$topic.title}</h2>
        <p class="lead top-description">
            {$topic.subtitle}
            <span class="pull-right"><a href="{:url('index/index')}">首页 </a>  &raquo; <a href="{$topic.nav_href}">{$topic.title}</a></span>
        </p>
    </div>
</div>

<div class="container mtn">

    <div class="row">
        <!-- content -->
        <div class="col-sm-9">
            <!--product_header-->
            <div class="row">
                <div class="col-md-5">
                    <img src="{:rand_thumb($vo['thumb'], $vo['id'])}" width="100%" alt="{$vo.title}">
                </div>
                <div class="col-md-7">
                    <h4>{$vo.title}</h4>
                    <p>分类：<a href="{:echo($topic['sub_nav'][$vo['tid']]['href'])}">{:echo($topic['sub_nav'][$vo['tid']]['title'])}</a></p>
                    <p>价格：<span class="text-danger">{if $vo['price']>0:}￥{$vo.price}{else:}免费{/if}</span></p>
                    <div>
                        {!empty $vo['git_link']:}<a class="btn btn-primary btn-sm" href="{$vo.git_link}" target="_blank">仓库 &raquo;</a>{/empty}
                        {!empty $vo['demo_link']:}<a class="btn btn-primary btn-sm" href="{$vo.demo_link}" target="_blank">演示 &raquo;</a>{/empty}
                        {!empty $vo['down_zip']:}<a class="btn btn-primary btn-sm" href="{$vo.down_zip}">下载 &raquo;</a>{/empty}
                    </div>
                </div>
            </div>
            <!--product_content-->
            <div class="panel panel-default mtn">
                <div class="panel-heading">
                    <h3 class="panel-title">产品介绍</h3>
                </div>
                <div class="panel-body">
                    {$vo.content}
                </div>
                <div class="panel-footer clearfix">
                    {php $related=get_related($vo['id'], 'product', ['order'=>'sort ASC,id DESC'])}
                    <span class="pull-left">
                        {if isset($related['prev']['id']):}<a href="{:url('product/detail',['id'=>$related['prev']['id']])}">上一个：{$related.prev.title}</a>{else:}上一个：没有了{/if}
                    </span>
                    <span class="pull-right">
                        {if isset($related['next']['id']):}<a href="{:url('product/detail',['id'=>$related['next']['id']])}">下一个：{$related.next.title}</a>{else:}下一个：没有了{/if}
                    </span>
                </div>
            </div>


        </div>
        <!-- sidebar -->
        <div class="col-sm-3">

            {!empty $topic['sub_nav']:}
            <div class="panel panel-default">
                <div class="list-group">
                    {foreach $topic['sub_nav'] as $sub}
                    <a href="{$sub.href}" class="list-group-item{if $sub['is_active']:} active{/if}" {$sub.target}>{$sub.title}</a>
                    {/foreach}
                </div>
            </div>
            {/empty}

            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">在线交流</h3>
                </div>
                <div class="panel-body">
                    QQ群：<a href="{:site('qq_qun1_link')}" target="_blank">{:site('qq_qun1')}</a>
                </div>
            </div>

        </div>
    </div>

</div>
{include file='index/_footer.html'}
</body>
</html>